import request from '@/utils/request.js'

// 图库分类-图库列表
export const getImageClassList = page => {
  return request({
    url: `/image_class/${page}`,
  })
}

// 图库分类-增加图库分类
export const createImageClass = data => {
  return request({
    url: '/image_class',
    method: 'post',
    data,
  })
}

// 图库分类-修改图库分类
export const updataImageClass = (id, data) => {
  return request({
    url: `/image_class/${id}`,
    method: 'post',
    data
  })
}

// 图库分类-删除图库分类
export const deleteImageClass = id => {
  return request({
    url: `/image_class/${id}/delete`,
    method: 'post',
  })
}

// 图库分类-指定分类下的图片列表
export const getImageList = (id, page = 1) => {
  return request({
    url: `/image_class/${id}/image/${page}`
  })
}